package com.example.shopping.mapper;

import com.example.shopping.pojo.Products;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ProductsMapper {
    @Insert("""
            insert into products values(null,#{productName},#{merchantId},#{price},#{description});
            """)
    int insert(Products product);

    @Select("""
            select * from products;
            """)
    List<Products> findAll();
}
